<template>
  <div>
    <div>
      <div style="display: flex; justify-content: space-around">
        <div class="left">
          <div class="labelItem">
            <span>公司名称：</span>{{ info.companyName }}
          </div>
          <div class="label"><span>电话：</span>{{ info.phoneNumber }}</div>
          <div class="labelItem">
            <span>法定代表人：</span>{{ info.legalPersonName }}
          </div>
          <div class="label">
            <span>企业规模：</span
            >{{
              info.regCapitalLabel == "XL"
                ? "超大型"
                : info.regCapitalLabel == "L"
                ? "大型"
                : info.regCapitalLabel == "M"
                ? "中型"
                : info.regCapitalLabel == "S"
                ? "小型"
                : info.regCapitalLabel == "XS"
                ? "微型"
                : info.regCapitalLabel == "ML"
                ? "中高型"
                : ""
            }}
          </div>
          <div class="labelItem">
            <span>注册资本：</span>{{ info.regCapital }}
          </div>
          <div class="label">
            <span>成立日期：</span>{{ info.establishedDate }}
          </div>

          <div class="labelItem">
            <span>工商注册号：</span>{{ info.regNumber }}
          </div>
          <div class="label">
            <span>企业类型：</span>{{ info.companyShowBizTypeName }}
          </div>
          <div class="labelItem">
            <span>银行账号：</span>{{ info.bankAccountNumber }}
          </div>
          <div class="label">
            <span>经营范围：</span>{{ info.businessScope }}
          </div>
        </div>
        <div class="right">
          <div class="labelItem">
            <span>统一社会信用代码：</span>{{ info.taxNumber }}
          </div>
          <div class="label"><span>国标行业：</span>{{ info.industry }}</div>
          <div class="labelItem"><span>邮箱：</span>{{ info.emailList }}</div>
          <div class="label">
            <span>是否小微企业：</span>{{ info.businessSizeDesc }}
          </div>
          <div class="labelItem"><span>网址：</span>{{ info.websiteList }}</div>
          <div class="label"><span>注册地址：</span>{{ info.regLocation }}</div>
          <div class="labelItem">
            <span>登记机关：</span>{{ info.regInstitute }}
          </div>
          <div class="label"><span>登记状态：</span>{{ info.regStatus }}</div>
          <div class="labelItem">
            <span>开户银行：</span>{{ info.openAccountBank }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getDictLabel } from "@/utils/dict";
import { EetTycEnterpriseInfo } from "@/api/campanyData";
export default {
  data() {
    return {
      centerDialogVisible: false,
      listLoading: false,
      detailDialog: false,

      formLoading: false,
      info: {},
    };
  },
  props: {
    initObj: {
      type: Object,
      default: () => false,
    },
    pinyin: {
      type: String,
      default: () => false,
    },
  },
  // watch: {
  //   show: {
  //     handler(val) {
  //       val && this.getInfo();
  //       val && this.getRecordList();
  //       this.centerDialogVisible = val;
  //     },
  //   },
  // },
  created() {
    this.getInfo();
  },
  mounted() {},
  methods: {
    getInfo() {
      var obj = {
        creditCode: this.initObj.taxNumber,
        pinyin: this.pinyin,
      };
      console.log(obj);
      const loading = this.$loading({
        lock: true,
        text: '加载中',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      EetTycEnterpriseInfo(obj)
        .then((res) => {
          this.info = res.data;
          loading.close();
        })
        .finally(() => {});
    },
  },
};
</script>

<style lang="scss" scoped>
/deep/ .el-dialog__title {
  color: #222222;
  font-size: 16px;
  font-weight: 500;
}
.title {
  font-weight: 500;
  font-size: 18px;
  color: #222222;
  margin-bottom: 20px;
}
.left {
  width: 50%;
  margin-right: 30px;
  .labelItem {
    text-align: left;
    padding: 15px 0;
    background: #f5f5f5;
    color: #222222;
    span {
      padding-left: 10px;
      color: #999999;
    }
  }
  .label {
    text-align: left;
    padding: 15px 0;
    color: #222222;
    span {
      padding-left: 10px;
      color: #999999;
    }
  }
}
.right {
  width: 50%;
  .labelItem {
    text-align: left;
    padding: 15px 0;
    background: #f5f5f5;
    color: #222222;
    span {
      padding-left: 10px;
      color: #999999;
    }
  }
  .label {
    text-align: left;
    padding: 15px 0;
    color: #222222;
    span {
      padding-left: 10px;
      color: #999999;
    }
  }
}

.detail {
  /deep/ .el-dialog__body {
    padding-left: 90px;
  }
  /deep/ .el-form-item__label {
    color: #222222;
    font-weight: 400;
    font-size: 16px;
  }
  /deep/ .el-form-item__content {
    color: #222222;
    font-size: 16px;
  }
}
</style>
